public class Teacher {
    private String teacherId;
    private String name;
    private String gender;
    private Course course;
    public Teacher(String teacherId, String name, String gender) {
        this.teacherId = teacherId;
        this.name = name;
        this.gender = gender;
    }
    public String displayInfo() {
        return "教师编号：" + teacherId + "，姓名：" + name + "，性别：" + gender +
                "，所授课程：" + (course != null ? course.getCourseName() : "无");
    }
    // Getters and Setters
    public String getTeacherId() {
        return teacherId;
    }
    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getGender() {
        return gender;
    }
    public void setGender(String gender) {
        this.gender = gender;
    }
    public Course getCourse() {
        return course;
    }
    public void setCourse(Course course) {
        this.course = course;
    }
}
